package ch4;

public class MadDog {
    String name;

    public MadDog(String name) {
        this.name = name;
    }
    public void bite(GoodPerson p ){
        System.out.println(name+"逮到好人使劲咬！");
        p.show();
        System.out.println("狗咬吕洞宾，不识好人心！");
    }
    public void bite(Hedgehog h){
        System.out.println(name+"神经病，连刺猬都咬！");
        h.show();
        System.out.println("狗咬刺猬，无从下口！");
    }
    public void bite(Dog d ){
        System.out.println(name+"疯了，连狗都咬！");
        d.show();
        System.out.println("狗咬狗，一嘴毛！");
    }
}

